# -*- coding: UTF-8 -*-
"""
@Project ：fast-api-project 
@File    ：main.py
@Author  ：xlcd
@Date    ：2025/10/31 11:01 
"""
import uvicorn
from uvicorn.config import LOGGING_CONFIG

from config.config import ServerConfig, LogConfig

if __name__ == "__main__":
    # 修改默认日志配置
    LOGGING_CONFIG["formatters"]["default"]["fmt"] = LogConfig.default_fmt
    LOGGING_CONFIG["formatters"]["default"]["datefmt"] = LogConfig.date_fmt
    LOGGING_CONFIG["formatters"]["access"]["fmt"] = LogConfig.access_fmt
    LOGGING_CONFIG["formatters"]["access"]["datefmt"] = LogConfig.date_fmt

    uvicorn.run("app:app", host=ServerConfig.host, port=ServerConfig.port, log_config=LOGGING_CONFIG)
